<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">


<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
        <tr>
            <th class="text-center" width="4%">
                <div class="table-first-id">ID</div>
            </th>
            <th class="text-center" width="18%">班级名称</th>
            <th class="text-center" width="18%">专业/科目</th>
            <th class="text-center" width="10%">课程</th>
            <th class="text-center" width="10%">讲师</th>
            <th class="text-center" width="10%">班主任</th>
            <th class="text-center" width="10%">学员数</th>
            <th class="text-center" width="10%">满班</th>
            <th class="text-center" width="10%">状态</th>
        </tr>
        </thead>
    </table>

    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover table-xs-content">
            <tbody id="tbodyMaterial">
            <tr class="jqgfirstrow" role="row">
                <td class="text-center" width="4%">
                    <div class="table-first-id"></div>
                </td>
                <td class="text-center" width="18%">&nbsp;</td>
                <td class="text-center" width="18%">&nbsp;</td>
                <td class="text-center" width="10%">&nbsp;</td>
                <td class="text-center" width="10%">&nbsp;</td>
                <td class="text-center" width="10%">&nbsp;</td>
                <td class="text-center" width="10%">&nbsp;</td>
                <td class="text-center" width="10%">&nbsp;</td>
                <td class="text-center" width="10%">&nbsp;</td>
            </tr>
            <tr th:if="${#maps.isEmpty(dataMap)} or ${#lists.isEmpty(dataMap['list'])}">
                <td colspan="9" class="text-center">
                <div class="noDataTipsBox">
                    <p><span class="c-4e fs16">还没有班级~~~</span></p>
                </div>
                </td>
            </tr>

            <tr th:each="classes : ${dataMap['list']}" th:attr="data-id=${classes['id']}, data-name=${classes['name']}">
                <td class="text-center">
                    <input type="checkbox" class="i-checks" name="id" th:value="${classes['id']}">
                </td>
                <td class="text-center" th:text="${classes['name']}"></td>
                <td class="text-center">
                    <span th:if="${#lists.isEmpty(classes['subjectList'])}">—</span>
                    <span th:each="subject, index : ${classes['subjectList']}" th:text="${index.index < index.size - 1} ? ${subject.subjectName} + '/' : ${subject.subjectName}"></span>
                </td>
                <td class="text-center">
                    <span th:if="!${#maps.isEmpty(classes['course'])}" th:text="${classes['course']['courseName']}"></span>
                    <span th:if="${#maps.isEmpty(classes['course'])}">—</span>
                </td>
                <td class="text-center" th:if="!${#maps.isEmpty(classes['course'])}">
                    <span th:each="teacher : ${classes['course']['teacherList']}" th:text="${#strings.concat(teacher['teacherName'], '&nbsp;&nbsp;')}"></span>
                </td>
                <td class="text-center" th:if="${#maps.isEmpty(classes['course'])}">
                    <span>—</span>
                </td>
                <td class="text-center" data-member>
                    <span th:if="${#lists.isEmpty(classes['memberList'])}" data-empty>—</span>
                    <span th:each="member : ${classes['memberList']}" th:if="${member['identity'] == 3}" th:text="${#strings.concat(member['member']['ralName'], '&nbsp;&nbsp;')}"></span>
                </td>
                <td class="text-center" th:text="${classes['studentCount']}"></td>
                <td class="text-center" data-full>
                    <span th:if="${classes['full']} == 1" class="label label-info">是</span>
                    <span th:if="${classes['full']} == 2" class="label label-default">否</span>
                </td>
                <td class="text-center" data-status>
                    <span th:if="${classes['status']} == 1" class="label label-info">正常</span>
                    <span th:if="${classes['status']} == 2" class="label label-danger">停班</span>
                </td>
            </tr>
            </tbody>
        </table>
    </div>

    <!-- 分页，开始 -->
    <div data-th-replace="layout/adminPage"></div>
    <!-- 分页，结束 -->
</div>

</html>
